home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 3 / Cream of the Crop 3.iso / comm / prtcs155.zip / UULOOKUP.WPL < prev    next >
Text File  |  1994-01-14  |  1KB  |  39 lines

  1. /* UUlookup.wplrx  For use with WPL and AmigaUUCP 1.13+
  2.  *
  3.  *
  4.  * This script allows WPL to look up a phone number for a site in the
  5.  * l.sys file
  6.  * Based upon:
  7.  * Russell McOrmond  rwm@Atronx.OCUnix.On.Ca Net Support:(613) 230-2282(V.32Bis)
  8.  * FidoNet 1:163/109 Amiga-Fido 1:1/109  Current WPL 'keeper of sources'.
  9.  */
  10.  
  11.  Options RESULTS
  12.  Options failat 99999
  13.  parse arg callsystem
  14.  myhost=address()
  15.  say "Trying to look up "||callsystem||" with host '"||myhost||"'"
  16.     if ~Open('lsys',"UULib:l.sys",'R') then do
  17.         say "Error reading UULib:l.sys file!!!"
  18.         Exit 1
  19.     end
  20.  
  21.     do forever
  22.         Line=ReadLn('lsys')
  23.         if EOF('lsys') then Leave
  24.         if Left(Line,1)='#' then Iterate
  25.         Parse var Line System Times Device Baud Phone Junk
  26.         if callsystem ~= System then Iterate
  27.         /* do any shell based stuff you might want to do */   
  28. /*        address 'COMMAND' */
  29.  
  30.         /* set host back to original to talk to slave */
  31.         address value myhost
  32.         'Set remote.number '||Phone
  33.         'Set remote.sitename '||system
  34.         'Set pw '||"LOOKUP"
  35.         Exit 0
  36.     end
  37. Exit 1
  38.  
  39.